//
//  DataFMDBHandle.h
//  礼物go
//
//  Created by dllo on 16/6/2.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import <FMDB.h>


#import "SelectContentModel.h"
#import "HotDetailModel.h"
#import "SelectDetailModel.h"
#import "SelectContentModel.h"


@interface DataFMDBHandle : NSObject

@property(nonatomic,retain)FMDatabaseQueue *dbQueue;



+(DataFMDBHandle *)shareDataFMDBHandle;
-(void)openDB;
-(void)createLoginTable;
-(void)insertLoginWithAccount:(NSString *)account Password:(NSString *)password;
-(NSMutableArray *)selectAllAccounts;
-(NSString *)selectAccount:(NSString *)account;


-(void)createHotColumnTable;
-(void)insertHotColumn:(HotDetailModel *)model WithAccount:(NSString *)account;
-(void)deleteHotcolumn:(NSString *)account myId:(NSNumber *)myId;
-(NSMutableArray *)selecthotColumn:(NSString *)account WithModelOrNot:(BOOL)YOrN;

-(void)createPresentTable;
-(void)insertPresent:(SelectDetailModel *)model WithAccount:(NSString *)account;
-(void)insertPresentContentModel:(SelectContentModel *)model WithAccount:(NSString *)account;

-(void)deletePresent:(NSString *)Account MyId:(NSNumber *)myId;
-(NSMutableArray *)selectPrsent:(NSString *)account WithModelOrNot:(BOOL)YOrN;
- (BOOL)presentDataWithId:(NSNumber *)myId WithAccount:(NSString *)account;

- (BOOL)selectDataWithmyId:(NSNumber *)myId WithAccount:(NSString *)account;

@end
